DevForce Help Reference
OrderBySelector<TSource>(IQueryable<TSource>,ISortSelector) Method
Example 


Sorts the elements of a sequence according to a SortSelector. Sorts on multiple properties are supported.
Syntax
'Declaration
 
<ExtensionAttribute()>
Public Overloads Shared Function OrderBySelector(Of TSource)( _
   ByVal source As IQueryable(Of TSource), _
   ByVal sortSelector As ISortSelector _
) As IOrderedQueryable(Of TSource)
'Usage
 
Dim source As IQueryable(Of TSource)
Dim sortSelector As ISortSelector
Dim value As IOrderedQueryable(Of TSource)
 
value = QueryableExtensions.OrderBySelector(Of TSource)(source, sortSelector)

Parameters

source
sortSelector

Type Parameters

TSource
Example
public void OrderBySample1() {
  var mgr = new DomainModelEntityManager();
  var selector = new SortSelector(typeof(Customer), "Country", ListSortDirection.Descending);
  var results = mgr.Customers.OrderBySelector(selector).ToList();    
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

QueryableExtensions Class
QueryableExtensions Members
Overload List

Send Feedback